/*
 * @Author: Zhang Yingying
 * @Date: 2020-11-05 16:12:20
 * @LastEditors: Zhang Yingying
 * @LastEditTime: 2020-11-24 22:27:01
 */
import BaseCrudApi from './BaseCrudApi'

export class UserApi extends BaseCrudApi {

  toggle(userId, state) {
    return this.http.patch(`user/toggle`, {
      id: userId,
      state,
    })
  }

  getAll(params) {
    return this.http.get('/user', {
      params,
    })
  }
}

export default new UserApi()
